// 异步逻辑
// 定义异步状态提交mutations并抛出同state.js
const actions = {
  reduceData({ commit }, params) {
    async function reduce(params) {
      let res = params
      return res
    }
    reduce(params).then((res) => {
      let data = res
      commit('reduceData', data)
    })
  },
  addData({ commit }, params) {
    async function add(params) {
      let res = params
      return res
    }
    add(params).then((res) => {
      let data = res
      commit('addData', data)
    })
  },
}

export default actions